﻿#region | Copyright © 2556 |

/*
##########################################################################
	Author By : Siriwat Suananpornpanit
	DateTime : 2556/08/30
##########################################################################
*/

#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Web;

namespace Web.Core
{
    public partial class ModalState
    {
        private static ModalState _mal;

        private static Type T = (typeof(ModalState));

        private PropertyInfo[] myPropertyInfo = T.GetProperties(BindingFlags.NonPublic | BindingFlags.Static);

        internal static String None { get { return (String)"0"; } }

        internal static String OnReload { get { return (String)"1"; } }

        internal static String OnToggleModal { get { return (String)"2"; } }

        internal static String OnToggleHeaderText { get { return (String)"3"; } }

        internal static String OnException { get { return (String)"4"; } }

        internal String State(String i)
        {
           return (String)((PropertyInfo)
                                myPropertyInfo[Convert.ToInt32(i)])
                                .Name;
        }

        public static ModalState GetInstance()
        {
            _mal = new ModalState();
            return _mal;
        }

     }
}